package com.jiazhong.常用类.Date;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

public class Demo01 {
    public static void main(String[] args) throws ParseException {
        Date date=new Date();
        System.out.println(date);
        SimpleDateFormat simpleDateFormat=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        String newdate=simpleDateFormat.format(date);
        System.out.println(newdate);
        Date date1=simpleDateFormat.parse(newdate);
        System.out.println(date1);


    }
}
